﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for EQuanTriVien
/// </summary>
public class EQuanTriVien
{
	private string tenDN;
	private string matKhau;
	private string quyen;
	private DateTime lanDNCuoi;
	private string trangThai;
	public EQuanTriVien()
	{}
    public EQuanTriVien(string tenDN, string matKhau, string quyen, DateTime lanDNCuoi, string trangThai)
	{
	this.tenDN = tenDN;
	this.matKhau = matKhau;
	this.quyen = quyen;
	this.lanDNCuoi = lanDNCuoi;
	this.trangThai = trangThai;
	}
	public string TenDN{
	get { return this.tenDN;}
	set { if(value==null) 
		throw new Exception("tenDN not allow nullvalue.");
		this.tenDN=value;
	}	}
	public string MatKhau{
	get { return this.matKhau;}
	set { if(value==null) 
		throw new Exception("matKhau not allow nullvalue.");
		this.matKhau=value;
	}	}
	public string Quyen{
	get { return this.quyen;}
	set {this.quyen=value;}
	}
	public DateTime LanDNCuoi{
	get { return this.lanDNCuoi;}
	set {this.lanDNCuoi=value;}
	}
	public string TrangThai{
	get { return this.trangThai;}
	set {this.trangThai=value;}
	}
	public override string ToString(){
	return this.tenDN+"; "+this.matKhau+"; "+this.quyen+"; "+this.lanDNCuoi+"; "+this.trangThai+"; ";
	}
	public override bool Equals(Object obj)
	{
        EQuanTriVien me = (EQuanTriVien)obj;
	bool ret=this.TenDN.Equals(me.TenDN);
	return ret;
	}
	public override int GetHashCode()
	{
	return this.TenDN.GetHashCode();
	}


}
public enum Quyen
{
    Loi,
    QuanTri,
    NhanVien,
    KhachHang
}